﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Main.master" AutoEventWireup="true" CodeBehind="DeliveryEntry.aspx.cs" Inherits="GPSTracker.Views.Delivery.DeliveryEntry" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <link href="../CSS/DeliveryEntry.css" rel="stylesheet" />
    <script src="../JS/DeliveryEntry.js"></script>

    <script language="javascript" type="text/javascript">

        function Fade(div) {
            setTimeout("document.getElementById('" + div + "').style.display='none'", 4000);
            setTimeout("document.getElementById('" + div + "').value = ''", 4000);
        }

        function showLoadingPanelDemo() {
            clientLoadingPanelDemo.Show();
        }

        function hideLoadingPanelDemo() {
            clientLoadingPanelDemo.Hide();
        }
    </script>


    <asp:ScriptManager ID="scrptMgr" runat="server">
    </asp:ScriptManager>
    <asp:UpdatePanel ID="UpMain" runat="server" UpdateMode="Conditional">
        <ContentTemplate>
            <dx:ASPxLoadingPanel ID="ASPxLoadingPanelDemo" runat="server" 
                ClientInstanceName="clientLoadingPanelDemo">
            </dx:ASPxLoadingPanel>
            <dx:ASPxCallback ID="ASPxCallbackDemo" runat="server" 
                        ClientInstanceName="clientCallbackDemo" >
                        <ClientSideEvents EndCallback="function(s, e) {
			                hideLoadingPanelDemo();
		                }" />
                    </dx:ASPxCallback>
            <table cellspacing="5" cellpadding="5" width="98%" border="0" align="center">
                <tr>
                    <td align="center">
                        <fieldset class="FiledSetDesign">
                            <legend class="PageHeading" align="center">
                                <asp:Label ID="lblHead" runat="server" Text="Delivery Entry"></asp:Label>
                            </legend>
                            <table width="100%" align="center" cellspacing="0" cellpadding="0">
                                <tr>
                                    <td align="left" style="padding-left: 5px; padding-right: 5px;">
                                        <span class="StaticLabel1">Fields Marks With <span style="color: Red">*</span> Are Mandatory </span>
                                        <hr style="height: 2px; border-style: solid; border-width: 1px 0 0 0; border-color: #cccccc;" />
                                    </td>
                                </tr>
                                <tr>
                                    <td style="padding: 2px;" width="100%">
                                        <table width="100%">
                                            <tr>
                                                <td width="15%" class="Fright">
                                                    <asp:Label ID="lblVoucherNo" runat="server" Text="Voucher No. :"></asp:Label><span class="space" style="color: Red;">*</span>
                                                </td>
                                                <td class="TableText" width="35%">
                                                    <dx:ASPxTextBox ID="txtVoucherNo" runat="server" CssClass="AllControlls_TextBox" AutoPostBack="true"
                                                        OnTextChanged="txtVoucherNo_TextChanged">
                                                        <ClientSideEvents KeyUp="function(s, e) {
                                                            s.SetText(s.GetText().toUpperCase());
                                                            }" />
                                                    </dx:ASPxTextBox>
                                                </td>
                                                <td width="15%" class="Fright">
                                                    <asp:Label ID="lblOrderNo" runat="server" Text="Order No. :" class="space"></asp:Label>
                                                </td>
                                                <td class="TableText" width="35%">
                                                    <dx:ASPxTextBox ID="txtOrderNo" runat="server" CssClass="AllControlls_TextBox" AutoPostBack="false"
                                                        OnTextChanged="txtOrderNo_TextChanged">
                                                        <ClientSideEvents KeyUp="function(s, e) {
                                                            s.SetText(s.GetText().toUpperCase());
                                                            }" />
                                                    </dx:ASPxTextBox>
                                                </td>
                                            </tr>
                                            <tr>                                                
                                                <td class="Fright">
                                                    <asp:Label ID="lblOrderDate" runat="server" Text="Order Date :" class="space"></asp:Label>
                                                </td>
                                                <td class="TableText" >
                                                    <dx:ASPxDateEdit ID="dtpOrderDate" runat="server" CssClass="devexp_dttm"
                                                        EditFormatString="dd-MMM-yyyy" EditFormat="DateTime">
                                                    </dx:ASPxDateEdit>
                                                </td>                                                
                                                <td class="Fright">
                                                    <asp:Label ID="lblBillNo" runat="server" Text="Bill No. :" class="space"></asp:Label>
                                                </td>
                                                <td class="TableText">
                                                    <dx:ASPxTextBox ID="txtBillNo" runat="server" CssClass="AllControlls_TextBox">
                                                        <ClientSideEvents KeyUp="function(s, e) {
                                                            s.SetText(s.GetText().toUpperCase());
                                                            }" />
                                                    </dx:ASPxTextBox>
                                                </td>
                                            </tr>
                                            <tr>                                                
                                                <td class="Fright">
                                                    <asp:Label ID="lblBillDate" runat="server" Text="Bill Date :" class="space"></asp:Label>
                                                </td>
                                                <td class="TableText">
                                                    <dx:ASPxDateEdit ID="dtpBillDate" runat="server" CssClass="devexp_dttm"
                                                        EditFormatString="dd-MMM-yyyy" EditFormat="DateTime">
                                                    </dx:ASPxDateEdit>
                                                </td>
                                                <td class="Fright">
                                                    <asp:Label ID="lblWarehouseID" runat="server" Text="Warehouse :"></asp:Label><span class="space" style="color: Red;">*</span>
                                                </td>
                                                <td class="TableText">
                                                    <dx:ASPxComboBox ID="cmbWarehouse" runat="server"
                                                        IncrementalFilteringMode="Contains"
                                                        OnDataBound="cmb_DataBound" CssClass="AllControlls_TextBox">
                                                    </dx:ASPxComboBox>
                                                </td>
                                            </tr>
                                            <tr>                                                
                                                <td class="Fright">
                                                    <asp:Label ID="lblBranchID" runat="server" Text="Branch :"></asp:Label><span class="space" style="color: Red;">*</span>
                                                </td>
                                                <td class="TableText">
                                                    <dx:ASPxComboBox ID="cmbBranch" runat="server"
                                                        IncrementalFilteringMode="Contains"
                                                        OnDataBound="cmb_DataBound" CssClass="AllControlls_TextBox">
                                                    </dx:ASPxComboBox>
                                                </td>
                                                <td class="Fright">
                                                    <asp:Label ID="lblCustomerName" runat="server" Text="Customer Name :"></asp:Label><span class="space" style="color: Red;">*</span>
                                                </td>
                                                <td class="TableText">
                                                    <dx:ASPxTextBox ID="txtCustomerName" runat="server" CssClass="AllControlls_TextBox">
                                                        <ClientSideEvents KeyUp="function(s, e) {
                                                            s.SetText(s.GetText().toUpperCase());
                                                            }" />
                                                    </dx:ASPxTextBox>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="Fright">
                                                    <asp:Label ID="Label11" runat="server" Text="Address1 :" ></asp:Label><span class="space" style="color: Red;">*</span>
                                                </td>
                                                <td class="TableText">
                                                    <dx:ASPxTextBox ID="txtAddress1" runat="server" CssClass="AllControlls_TextBox">
                                                        <ClientSideEvents KeyUp="function(s, e) {
                                                            s.SetText(s.GetText().toUpperCase());
                                                            }" />
                                                    </dx:ASPxTextBox>
                                                </td>
                                                <td class="Fright">
                                                    <asp:Label ID="Label12" runat="server" Text="Address2 :" class="space"></asp:Label>
                                                </td>
                                                <td class="TableText">
                                                    <dx:ASPxTextBox ID="txtAddress2" runat="server" CssClass="AllControlls_TextBox">
                                                        <ClientSideEvents KeyUp="function(s, e) {
                                                            s.SetText(s.GetText().toUpperCase());
                                                            }" />
                                                    </dx:ASPxTextBox>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="Fright">
                                                    <asp:Label ID="Label13" runat="server" Text="Address3 :" class="space"></asp:Label>
                                                </td>
                                                <td class="TableText">
                                                    <dx:ASPxTextBox ID="txtAddress3" runat="server" CssClass="AllControlls_TextBox">
                                                        <ClientSideEvents KeyUp="function(s, e) {
                                                            s.SetText(s.GetText().toUpperCase());
                                                            }" />
                                                    </dx:ASPxTextBox>
                                                </td>
                                                <td class="Fright">
                                                    <asp:Label ID="Label14" runat="server" Text="Address4 :" class="space"></asp:Label>
                                                </td>
                                                <td class="TableText">
                                                    <dx:ASPxTextBox ID="txtAddress4" runat="server" CssClass="AllControlls_TextBox">
                                                        <ClientSideEvents KeyUp="function(s, e) {
                                                            s.SetText(s.GetText().toUpperCase());
                                                            }" />
                                                    </dx:ASPxTextBox>
                                                </td>
                                            </tr>                                            
                                            <tr>
                                                <td class="Fright" >
                                                    <asp:Label ID="Label1" runat="server" Text="City :" ></asp:Label><span class="space" style="color: Red;">*</span>
                                                </td>
                                                <td class="TableText" >
                                                    <dx:ASPxTextBox ID="txtCity" runat="server" CssClass="AllControlls_Text" >
                                                        <ClientSideEvents KeyUp="function(s, e) {
                                                            s.SetText(s.GetText().toUpperCase());
                                                            }" />
                                                    </dx:ASPxTextBox>
                                                </td>
                                                <td class="Fright">
                                                    <asp:Label ID="lblPincode" runat="server" Text="Pincode :" class="space"></asp:Label>
                                                </td>
                                                <td class="TableText">
                                                    <dx:ASPxTextBox ID="txtPincode" runat="server" CssClass="AllControlls_TextBox">
                                                        <ClientSideEvents KeyUp="function(s, e) {
                                                            s.SetText(s.GetText().toUpperCase());
                                                            }" />
                                                    </dx:ASPxTextBox>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="Fright">
                                                    <asp:Label ID="Label10" runat="server" Text="Area :"></asp:Label><span class="space" style="color: Red;">*</span>
                                                </td>
                                                <td class="TableText">
                                                    <dx:ASPxComboBox ID="cmbArea" runat="server"
                                                        IncrementalFilteringMode="Contains"
                                                        OnDataBound="cmb_DataBound" CssClass="AllControlls_TextBox">
                                                    </dx:ASPxComboBox>
                                                </td>
                                                <td class="Fright">
                                                    <asp:Label ID="Label2" runat="server" Text="Contact No :" class="space"></asp:Label>
                                                </td>
                                                <td class="TableText">
                                                    <dx:ASPxTextBox ID="txtContactNo" runat="server" CssClass="AllControlls_TextBox">
                                                        <ClientSideEvents KeyUp="function(s, e) {
                                                            s.SetText(s.GetText().toUpperCase());
                                                            }" />
                                                    </dx:ASPxTextBox>
                                                </td>
                                            </tr>                                            
                                            <tr>
                                                <td class="Fright">
                                                    <asp:Label ID="Label3" runat="server" Text="Email ID :" class="space"></asp:Label>
                                                </td>
                                                <td class="TableText">
                                                    <dx:ASPxTextBox ID="txtEmailID" runat="server" CssClass="AllControlls_TextBox"></dx:ASPxTextBox>
                                                </td>
                                                <td class="Fright">
                                                    <asp:Label ID="Label4" runat="server" Text="Model Code :"></asp:Label><span class="space" style="color: Red;">*</span>
                                                </td>
                                                <td class="TableText">
                                                    <dx:ASPxTextBox ID="txtModelCode" runat="server" CssClass="AllControlls_TextBox">
                                                        <ClientSideEvents KeyUp="function(s, e) {
                                                            s.SetText(s.GetText().toUpperCase());
                                                            }" />
                                                    </dx:ASPxTextBox>
                                                </td>
                                            </tr>
                                            <tr>                                                
                                                <td class="Fright">
                                                    <asp:Label ID="Label5" runat="server" Text="Model Type :"></asp:Label><span class="space" style="color: Red;">*</span>
                                                </td>
                                                <td class="TableText">
                                                    <dx:ASPxTextBox ID="txtModelType" runat="server" CssClass="AllControlls_TextBox">
                                                        <ClientSideEvents KeyUp="function(s, e) {
                                                            s.SetText(s.GetText().toUpperCase());
                                                            }" />
                                                    </dx:ASPxTextBox>
                                                </td>
                                                <td class="Fright">
                                                    <asp:Label ID="Label15" runat="server" Text="Item Description :"></asp:Label><span class="space" style="color: Red;">*</span>
                                                </td>
                                                <td class="TableText">
                                                    <dx:ASPxTextBox ID="txtItemDescription" runat="server" CssClass="AllControlls_TextBox">
                                                        <ClientSideEvents KeyUp="function(s, e) {
                                                            s.SetText(s.GetText().toUpperCase());
                                                            }" />
                                                    </dx:ASPxTextBox>
                                                </td>
                                            </tr>

                                            <tr>                                                                                                
                                                <td class="Fright">
                                                    <asp:Label ID="Label17" runat="server" Text="Chasis No. :" class="space"></asp:Label>
                                                </td>
                                                <td class="TableText">
                                                    <dx:ASPxTextBox ID="txtChasisNo" runat="server" CssClass="AllControlls_TextBox">
                                                        <ClientSideEvents KeyUp="function(s, e) {
                                                            s.SetText(s.GetText().toUpperCase());
                                                            }" />
                                                    </dx:ASPxTextBox>
                                                </td>
                                                <td class="Fright">
                                                    <asp:Label ID="Label7" runat="server" Text="Quantity :"></asp:Label><span class="space" style="color: Red;">*</span>
                                                </td>
                                                <td class="TableText">
                                                    <dx:ASPxTextBox ID="txtQuantity" runat="server" CssClass="AllControlls_TextBox"> 
                                                        <masksettings Mask="<1..9999999999>" />                                                       
                                                    </dx:ASPxTextBox>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td colspan="4">
                                                    <hr style="height: 2px; border-style: solid; border-width: 1px 0 0 0; border-color: #cccccc;" />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="padding-left: 1px; padding-top: 0px; padding-bottom: 4px;">
                                                    <table cellpadding="0" cellspacing="0">
                                                        <tr>
                                                            <td>
                                                                <asp:HiddenField ID="hdnDeliveryEntry" runat="server" />
                                                                <dx:ASPxButton ID="btnSave" runat="server" Text="Save" OnClick="btnSave_Click" Width="80">
                                                                    <ClientSideEvents Click="function(s, e)
                                                                    {
                                                                        if(Validate() == true)
                                                                        {
                                                                            e.processOnServer = true;
                                                                            showLoadingPanelDemo();	
							                                                clientCallbackDemo.PerformCallback('callback');
                                                                        }
                                                                        else
                                                                        {
                                                                            e.processOnServer = false;
                                                                        }
                                                                    }
                                                                " />
                                                                </dx:ASPxButton>
                                                                <dx:ASPxButton ID="btnUpdate" runat="server" Text="Update" OnClick="btnUpdate_Click" Width="80">
                                                                    <ClientSideEvents Click="function(s, e)
                                                                    {
                                                                        if(Validate() == true)
                                                                        {
                                                                            e.processOnServer = true;
                                                                            showLoadingPanelDemo();	
							                                                clientCallbackDemo.PerformCallback('callback');
                                                                        }
                                                                        else
                                                                        {
                                                                            e.processOnServer = false;
                                                                        }
                                                                    }
                                                                " />
                                                                </dx:ASPxButton>
                                                            </td>
                                                            <td style="padding-left:5px;">
                                                                <dx:ASPxButton ID="btnClear" runat="server" Text="Clear" Width="80" OnClick="btnClear_Click"></dx:ASPxButton>
                                                            </td>
                                                        </tr>
                                                    </table>


                                                </td>
                                                <td colspan="3" style="text-align: left; padding-left: 5px;">
                                                    <asp:Label ID="lblMessage" runat="server" Text="" Visible="false"></asp:Label>
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                            </table>
                        </fieldset>
                    </td>
                </tr>
            </table>
        </ContentTemplate>
        <Triggers>
            <asp:PostBackTrigger ControlID="btnSave" />
        </Triggers>
    </asp:UpdatePanel>
</asp:Content>
